<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	template="adminTemplate.xhtml">



	<ui:define name="pageIntro">
		<h2>Create Component</h2>
		<p class="lftText">Use this form to create a <span>component</span>.<br />
		<span>Component</span>s are parts of projects and can only be modified
		by administrator of project owners. The only purpose of component is
		to give a better organization of issues. You do not have to create a
		components an action element (for example a bug, feature request, or
		what ever you create), must be connected to a component or ro a
		project directly.</p>
	</ui:define>


	<ui:define name="mainForm">
		<h:form id="crtCompForm">
			<h:panelGrid columns="2">

				<h:outputLabel for="crtCmptName" value="Name"></h:outputLabel>
				<h:inputText id="crtCmptName"
					value="#{createComponent.component.name}" required="true">
					<f:validateLength minimum="3" maximum="50" />
				</h:inputText>

				<h:outputLabel for="crtCmptDescription" value="Description"></h:outputLabel>
				<h:inputTextarea id="crtCmptDescription"
					value="#{createComponent.component.description}">
					<f:validateLength maximum="400" />
				</h:inputTextarea>

				<h:outputLabel for="crtCmptProject" value="Project"></h:outputLabel>
				<h:selectOneMenu id="crtCmptProject"
					value="#{createComponent.component.project}"
					converter="#{projectConverter}">
					<t:selectItems var="project" value="#{listProject.projects}"
						itemLabel="#{project.name}" itemValue="#{project}"
						id="crtCmptPrjs" />
				</h:selectOneMenu>

			</h:panelGrid>
			<h:commandButton value="Save" action="#{createComponent.save}"
				id="crtCmptSbt"></h:commandButton>
		</h:form>
	</ui:define>
</ui:composition>
